import Vue from 'vue'
import Vuex from 'vuex'
import user from './user/index.js'


Vue.use(Vuex)

export default new Vuex.Store({
  // 存数据
  state: {
    order_form: [],
    shop_car: []
  },

  getters: {
  },

  // 修改数据
  mutations: {
    setOrderForm(state, value) {
      state.order_form = value;
    },
    setShopCar(state, value) {
      state.shop_car = value;
    },
  },


  actions: {
    setOrderFormAsync(content, value) {
      content.commit('setOrderForm', value)
    },
    setShopCarAsync(content, value) {
      content.commit('setShopCar', value)
    }
  },

  modules: {
    user
  }

})
